package cn.j229.bug.zhongxuan.hualian.service.impl;

import cn.j229.bug.zhongxuan.hualian.mapper.AdminMapper;
import cn.j229.bug.zhongxuan.hualian.pojo.Admin;
import cn.j229.bug.zhongxuan.hualian.service.AdminService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author smile_ZhongXuan
 * @Date 2020/10/22 16:56
 * @Version 1.0
 */
@Service("adminService")
public class AdminServiceImpl implements AdminService {

    @Resource
    AdminMapper adminMapper = null;

    @Override
    public int addAdmin(Admin admin) {
        return adminMapper.insertSelective(admin);
    }

    @Override
    public Admin findPhoneByAdmin(String phone) {
        Admin admin = new Admin();
        admin.setPhone(phone);
        return adminMapper.selectOne(admin);
    }

}
